<?php

class partnersComponents extends sfComponents
{

    public function executeAdvert_partners()
    {
        $type = empty( $this->obj_type ) ? MyConstants::TypeAuto : $this->obj_type;
        
        $c = new Criteria();
        $c->add(PartnerPeer::TYPE, 1);
        $c->addDescendingOrderByColumn(PartnerPeer::ID);
        $this->partners = PartnerPeer::doSelect($c);
    }

    public function executeAdvert_dealers()
    {
        $type = empty( $this->obj_type ) ? MyConstants::TypeAuto : $this->obj_type;
        
        $c = new Criteria();
        $c->add(PartnerPeer::TYPE, 0);
        $c->addDescendingOrderByColumn(PartnerPeer::ID);
        $this->partners = PartnerPeer::doSelect($c);
    }
    
}

?>